package com.seckill;

import com.seckill.annotation.IsPhone;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

public class PhoneValid implements ConstraintValidator<IsPhone,String> {
    private boolean required;

    @Override
    public void initialize(IsPhone isPhone) {
        required = isPhone.required();
    }

    @Override
    public boolean isValid(String s, ConstraintValidatorContext constraintValidatorContext) {
        //TODO 填写业务逻辑

        return false;
    }
}
